#pragma once
#include <memory>

#include "request_data.h"
#include "acceptor.h"
#include "signal_manager.h"
#include "timer_manager.h"
#include "event_loop_thread_pool.h"
#include "event_loop.h"

class Server
{
public:
    Server(EventLoop* loop);
    ~Server();

    void Start();
    // 处理连接事件
    void HandleConnection(int connectFd);


private:
    std::unique_ptr<Acceptor> acceptor_;
    EventLoop* loop_;
    std::unique_ptr<EventLoopThreadPool> thdPool_;
    
    std::map<int, RequestDataPtr> requestDataPtrs;
};